PDF4Java Reference Documentation
com.o2sol.pdf4java.utilities Package / PDFEncryptor Class / encryptFile Method / encryptFile(Stream,String,Stream,PDFSecurityHandler,boolean) Method
Stream containing the input PDF file.
Password for the input file if it is encrypted, othewise null.
Stream for storing the encrypted PDF file.
The security handler used for encryption.
If true then the internal structure of the output PDF file is compressed.
In This Topic
    encryptFile(Stream,String,Stream,PDFSecurityHandler,boolean) Method
    In This Topic
    Encrypts the PDF file given in input stream and saves the encrypted file to output stream.
    Syntax
    public static void encryptFile( 
       Stream input,
       java.lang.String inputPassword,
       Stream output,
       PDFSecurityHandler securityHandler,
       boolean enableObjectCompression
    )

    Parameters

    input
    Stream containing the input PDF file.
    inputPassword
    Password for the input file if it is encrypted, othewise null.
    output
    Stream for storing the encrypted PDF file.
    securityHandler
    The security handler used for encryption.
    enableObjectCompression
    If true then the internal structure of the output PDF file is compressed.
    See Also